package pers.xiaojun.boot.common.validation.constraints;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import pers.xiaojun.boot.common.validation.validator.InEnumValidator;
import pers.xiaojun.boot.common.validation.validator.MobileValidator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 校验手机号
 *
 * @author xiaojun
 * @since 2025-11-19
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Constraint(validatedBy = MobileValidator.class)
public @interface Mobile {

    String message() default "手机号格式不正确";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
